from tortoise import BaseDBAsyncClient


async def upgrade(db: BaseDBAsyncClient) -> str:
    return """
        ALTER TABLE `saas_buckling` ADD `price` DECIMAL(10,2) NOT NULL  COMMENT '划扣总金额';
        ALTER TABLE `saas_buckling_detail` ADD `buckling_price` DECIMAL(10,2) NOT NULL  COMMENT '划扣金额';"""


async def downgrade(db: BaseDBAsyncClient) -> str:
    return """
        ALTER TABLE `saas_buckling` DROP COLUMN `price`;
        ALTER TABLE `saas_buckling_detail` DROP COLUMN `buckling_price`;"""
